package com.kaishengit.web;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.kaishengit.dao.ProdDao;
import com.kaishengit.entity.Prod;

public class HomeServlet extends HttpServlet {

	
	private static final long serialVersionUID = 1L;

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		
			ProdDao dao=new ProdDao();
			List<Prod > prodList=dao.findAll();
			request.setAttribute("prodList", prodList);
			request.getRequestDispatcher("main.jsp").forward(request, response);
	}

}
				
